package com.ant.config;

import com.ant.Interceptor.AccessInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author 党怡承
 * @version 1.0
 * @date 2021-08-04 9:37
 * @description
 * @copyright 2021
 */
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {
    /**
     * 注册拦截器
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry){
        registry.addInterceptor(new AccessInterceptor());
    }
}
